﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Runtime.Serialization;
using System.Web.Mvc;
using System.ComponentModel.DataAnnotations;

namespace Store.Web.Models
{
    [DataContract]
    public class Order
    {
        [DataMember]
        [HiddenInput]
        public int Id { get; set; }

        [DataMember]
        [DataType(DataType.Currency)]
        public decimal TotalPrice { get; set; }

        [DataMember]
        public List<Product> Products { get; set; }

        [DataMember]
        public Address ShipAddress { get; set; }

        [DataMember]
        [HiddenInput]
        public int ShipAddressId { get; set; }

        [DataMember]
        public int State { get; set; }

        [DataMember]
        public DateTime CreationDate { get; set; }

        [DataMember]
        public DateTime ModificationDate { get; set; }

        [DataMember]
        public Customer Customer { get; set; }

        [DataMember]
        [HiddenInput]
        public int CustomerId { get; set; }
    }
}